package com.eshop.modules.activity.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import java.util.Date;
import java.math.BigDecimal;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eshop.domain.BaseDomain;

@TableName("store_coupon_user")
public class StoreCouponUser extends BaseDomain
{
    @TableId
    @ApiModelProperty("优惠券发放记录id")
    private Long id;
    @ApiModelProperty("兑换的项目id")
    private Integer cid;
    @ApiModelProperty("优惠券所属用户")
    private Long uid;
    @ApiModelProperty("优惠券名称")
    private String couponTitle;
    @ApiModelProperty("优惠券的面值")
    private BigDecimal couponPrice;
    @ApiModelProperty("最低消费多少金额可用优惠券")
    private BigDecimal useMinPrice;
    @ApiModelProperty("优惠券结束时间")
    private Date endTime;
    @ApiModelProperty("使用时间")
    private Date useTime;
    @ApiModelProperty("获取方式：get领取 send派送")
    private String type;
    @ApiModelProperty("状态（0：未使用，1：已使用, 2:已过期）")
    private Integer status;
    @ApiModelProperty("是否有效1是 0否")
    private Integer isFail;
    
    public void copy(final StoreCouponUser source) {
        BeanUtil.copyProperties((Object)source, (Object)this, CopyOptions.create().setIgnoreNullValue(true));
    }
    
    public static StoreCouponUserBuilder builder() {
        return new StoreCouponUserBuilder();
    }
    
    public Long getId() {
        return this.id;
    }
    
    public Integer getCid() {
        return this.cid;
    }
    
    public Long getUid() {
        return this.uid;
    }
    
    public String getCouponTitle() {
        return this.couponTitle;
    }
    
    public BigDecimal getCouponPrice() {
        return this.couponPrice;
    }
    
    public BigDecimal getUseMinPrice() {
        return this.useMinPrice;
    }
    
    public Date getEndTime() {
        return this.endTime;
    }
    
    public Date getUseTime() {
        return this.useTime;
    }
    
    public String getType() {
        return this.type;
    }
    
    public Integer getStatus() {
        return this.status;
    }
    
    public Integer getIsFail() {
        return this.isFail;
    }
    
    public void setId(final Long id) {
        this.id = id;
    }
    
    public void setCid(final Integer cid) {
        this.cid = cid;
    }
    
    public void setUid(final Long uid) {
        this.uid = uid;
    }
    
    public void setCouponTitle(final String couponTitle) {
        this.couponTitle = couponTitle;
    }
    
    public void setCouponPrice(final BigDecimal couponPrice) {
        this.couponPrice = couponPrice;
    }
    
    public void setUseMinPrice(final BigDecimal useMinPrice) {
        this.useMinPrice = useMinPrice;
    }
    
    public void setEndTime(final Date endTime) {
        this.endTime = endTime;
    }
    
    public void setUseTime(final Date useTime) {
        this.useTime = useTime;
    }
    
    public void setType(final String type) {
        this.type = type;
    }
    
    public void setStatus(final Integer status) {
        this.status = status;
    }
    
    public void setIsFail(final Integer isFail) {
        this.isFail = isFail;
    }
    
    public String toString() {
        return "StoreCouponUser(id=" + this.getId() + ", cid=" + this.getCid() + ", uid=" + this.getUid() + ", couponTitle=" + this.getCouponTitle() + ", couponPrice=" + this.getCouponPrice() + ", useMinPrice=" + this.getUseMinPrice() + ", endTime=" + this.getEndTime() + ", useTime=" + this.getUseTime() + ", type=" + this.getType() + ", status=" + this.getStatus() + ", isFail=" + this.getIsFail() + ")";
    }
    
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof StoreCouponUser)) {
            return false;
        }
        final StoreCouponUser other = (StoreCouponUser)o;
        if (!other.canEqual(this)) {
            return false;
        }
        if (!super.equals(o)) {
            return false;
        }
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        Label_0075: {
            if (this$id == null) {
                if (other$id == null) {
                    break Label_0075;
                }
            }
            else if (this$id.equals(other$id)) {
                break Label_0075;
            }
            return false;
        }
        final Object this$cid = this.getCid();
        final Object other$cid = other.getCid();
        Label_0112: {
            if (this$cid == null) {
                if (other$cid == null) {
                    break Label_0112;
                }
            }
            else if (this$cid.equals(other$cid)) {
                break Label_0112;
            }
            return false;
        }
        final Object this$uid = this.getUid();
        final Object other$uid = other.getUid();
        Label_0149: {
            if (this$uid == null) {
                if (other$uid == null) {
                    break Label_0149;
                }
            }
            else if (this$uid.equals(other$uid)) {
                break Label_0149;
            }
            return false;
        }
        final Object this$status = this.getStatus();
        final Object other$status = other.getStatus();
        Label_0186: {
            if (this$status == null) {
                if (other$status == null) {
                    break Label_0186;
                }
            }
            else if (this$status.equals(other$status)) {
                break Label_0186;
            }
            return false;
        }
        final Object this$isFail = this.getIsFail();
        final Object other$isFail = other.getIsFail();
        Label_0223: {
            if (this$isFail == null) {
                if (other$isFail == null) {
                    break Label_0223;
                }
            }
            else if (this$isFail.equals(other$isFail)) {
                break Label_0223;
            }
            return false;
        }
        final Object this$couponTitle = this.getCouponTitle();
        final Object other$couponTitle = other.getCouponTitle();
        Label_0260: {
            if (this$couponTitle == null) {
                if (other$couponTitle == null) {
                    break Label_0260;
                }
            }
            else if (this$couponTitle.equals(other$couponTitle)) {
                break Label_0260;
            }
            return false;
        }
        final Object this$couponPrice = this.getCouponPrice();
        final Object other$couponPrice = other.getCouponPrice();
        Label_0297: {
            if (this$couponPrice == null) {
                if (other$couponPrice == null) {
                    break Label_0297;
                }
            }
            else if (this$couponPrice.equals(other$couponPrice)) {
                break Label_0297;
            }
            return false;
        }
        final Object this$useMinPrice = this.getUseMinPrice();
        final Object other$useMinPrice = other.getUseMinPrice();
        Label_0334: {
            if (this$useMinPrice == null) {
                if (other$useMinPrice == null) {
                    break Label_0334;
                }
            }
            else if (this$useMinPrice.equals(other$useMinPrice)) {
                break Label_0334;
            }
            return false;
        }
        final Object this$endTime = this.getEndTime();
        final Object other$endTime = other.getEndTime();
        Label_0371: {
            if (this$endTime == null) {
                if (other$endTime == null) {
                    break Label_0371;
                }
            }
            else if (this$endTime.equals(other$endTime)) {
                break Label_0371;
            }
            return false;
        }
        final Object this$useTime = this.getUseTime();
        final Object other$useTime = other.getUseTime();
        Label_0408: {
            if (this$useTime == null) {
                if (other$useTime == null) {
                    break Label_0408;
                }
            }
            else if (this$useTime.equals(other$useTime)) {
                break Label_0408;
            }
            return false;
        }
        final Object this$type = this.getType();
        final Object other$type = other.getType();
        if (this$type == null) {
            if (other$type == null) {
                return true;
            }
        }
        else if (this$type.equals(other$type)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof StoreCouponUser;
    }
    
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        final Object $id = this.getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        final Object $cid = this.getCid();
        result = result * 59 + (($cid == null) ? 43 : $cid.hashCode());
        final Object $uid = this.getUid();
        result = result * 59 + (($uid == null) ? 43 : $uid.hashCode());
        final Object $status = this.getStatus();
        result = result * 59 + (($status == null) ? 43 : $status.hashCode());
        final Object $isFail = this.getIsFail();
        result = result * 59 + (($isFail == null) ? 43 : $isFail.hashCode());
        final Object $couponTitle = this.getCouponTitle();
        result = result * 59 + (($couponTitle == null) ? 43 : $couponTitle.hashCode());
        final Object $couponPrice = this.getCouponPrice();
        result = result * 59 + (($couponPrice == null) ? 43 : $couponPrice.hashCode());
        final Object $useMinPrice = this.getUseMinPrice();
        result = result * 59 + (($useMinPrice == null) ? 43 : $useMinPrice.hashCode());
        final Object $endTime = this.getEndTime();
        result = result * 59 + (($endTime == null) ? 43 : $endTime.hashCode());
        final Object $useTime = this.getUseTime();
        result = result * 59 + (($useTime == null) ? 43 : $useTime.hashCode());
        final Object $type = this.getType();
        result = result * 59 + (($type == null) ? 43 : $type.hashCode());
        return result;
    }
    
    public StoreCouponUser(final Long id, final Integer cid, final Long uid, final String couponTitle, final BigDecimal couponPrice, final BigDecimal useMinPrice, final Date endTime, final Date useTime, final String type, final Integer status, final Integer isFail) {
        this.id = id;
        this.cid = cid;
        this.uid = uid;
        this.couponTitle = couponTitle;
        this.couponPrice = couponPrice;
        this.useMinPrice = useMinPrice;
        this.endTime = endTime;
        this.useTime = useTime;
        this.type = type;
        this.status = status;
        this.isFail = isFail;
    }
    
    public StoreCouponUser() {
    }
    
    public static class StoreCouponUserBuilder
    {
        private Long id;
        private Integer cid;
        private Long uid;
        private String couponTitle;
        private BigDecimal couponPrice;
        private BigDecimal useMinPrice;
        private Date endTime;
        private Date useTime;
        private String type;
        private Integer status;
        private Integer isFail;
        
        StoreCouponUserBuilder() {
        }
        
        public StoreCouponUserBuilder id(final Long id) {
            this.id = id;
            return this;
        }
        
        public StoreCouponUserBuilder cid(final Integer cid) {
            this.cid = cid;
            return this;
        }
        
        public StoreCouponUserBuilder uid(final Long uid) {
            this.uid = uid;
            return this;
        }
        
        public StoreCouponUserBuilder couponTitle(final String couponTitle) {
            this.couponTitle = couponTitle;
            return this;
        }
        
        public StoreCouponUserBuilder couponPrice(final BigDecimal couponPrice) {
            this.couponPrice = couponPrice;
            return this;
        }
        
        public StoreCouponUserBuilder useMinPrice(final BigDecimal useMinPrice) {
            this.useMinPrice = useMinPrice;
            return this;
        }
        
        public StoreCouponUserBuilder endTime(final Date endTime) {
            this.endTime = endTime;
            return this;
        }
        
        public StoreCouponUserBuilder useTime(final Date useTime) {
            this.useTime = useTime;
            return this;
        }
        
        public StoreCouponUserBuilder type(final String type) {
            this.type = type;
            return this;
        }
        
        public StoreCouponUserBuilder status(final Integer status) {
            this.status = status;
            return this;
        }
        
        public StoreCouponUserBuilder isFail(final Integer isFail) {
            this.isFail = isFail;
            return this;
        }
        
        public StoreCouponUser build() {
            return new StoreCouponUser(this.id, this.cid, this.uid, this.couponTitle, this.couponPrice, this.useMinPrice, this.endTime, this.useTime, this.type, this.status, this.isFail);
        }
        
        @Override
        public String toString() {
            return "StoreCouponUser.StoreCouponUserBuilder(id=" + this.id + ", cid=" + this.cid + ", uid=" + this.uid + ", couponTitle=" + this.couponTitle + ", couponPrice=" + this.couponPrice + ", useMinPrice=" + this.useMinPrice + ", endTime=" + this.endTime + ", useTime=" + this.useTime + ", type=" + this.type + ", status=" + this.status + ", isFail=" + this.isFail + ")";
        }
    }
}
